TestClass = type("TestClass", (object,), {
	"say": lambda self : print("你好啊")
})

test = TestClass()
test.say()


def getter(name):
	def getterMethod(self):
		return self.__getattribute__(name)
	return getterMethod

def setter(name):
	def setterMethod(self, value):
		self.__setattr__(name, value)
	return setterMethod	

class TestClass:
	getName = getter("name")
	setName = setter("name")

test = TestClass()
test.setName("段光伟")
print(test.getName())